@{
    ViewData["Title"] = "编辑";
    Layout = "~/Areas/Manager/Views/Shared/_Layout.cshtml";
}
@model Sykj.Entity.SiteMessage
    <div class="layui-bg" style="padding-bottom:200px">
        <form class="layui-form" style="padding: 20px 30px 0 0;" method="post">
            <div class="layui-tab layui-tab-brief" style="margin-top:-3px;">
                <ul class="layui-tab-title">
                    <li class="layui-this">基本信息</li>
                    <li>其他内容</li>
                </ul>
                <div class="layui-tab-content">
                    <div class="layui-tab-item layui-show">
                        <div class="layui-form-item">
                            <label class="layui-form-label">发送者</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="SenderUser" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">接收者</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="ReceivUser" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">接收姓名</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="ReceivUserTrueName" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">标题</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="Title" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">内容</label>
                            <div class="layui-col-xs9">
                                <textarea id="Content"  class="layui-textarea"  readonly asp-for="Content" style="height:150px;width:100%" name="Content"></textarea>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">类型</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly id="MsgType" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">发送时间</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="SendTime" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">读取日期</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="ReadTime" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">是否已读</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly id="ReceiverIsRead" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                    </div>
                    <div class="layui-tab-item">

                        <div class="layui-form-item">
                            <label class="layui-form-label">发送者是否删除</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly id="SenderIsDel" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">接收者是否删除</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly id="ReaderIsDel" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">扩展1</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="Ext1" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <label class="layui-form-label">扩展2</label>
                            <div class="layui-col-xs9">
                                <input type="text" readonly asp-for="Ext2" lay-verify="required" class="layui-input">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-form-item">
                <div class="layui-col-xs4"></div>
                <div class="layui-col-xs2">
                    <button id="close" type="button" class="layui-btn layui-btn-primary">返回</button>
                </div>
            </div>
        </form>
    </div>


@section scriptsfeet
    {
    <script type="text/javascript">
    layui.config({
        base: '/layuiadmin/' //静态资源所在路径;
    }).use(['form', 'sykjwh', 'element'], function () {

        var $ = layui.$,form = layui.form,sykjwh = layui.sykjwh;

        $("#close").click(function () {
            sykjwh.close();
        });

        initInfo();

        function initInfo() {
            if ('@Model.MsgType' == 'System') {
                $("#MsgType").val("系统消息");
            } else if ('@Model.MsgType'== 'Order') {
                $("#MsgType").val("订单消息");
            } else if ('@Model.MsgType'== 'Notice') {
                $("#MsgType").val("通知消息");
            }
            if ('@Model.ReceiverIsRead'== 'True') {
                $("#ReceiverIsRead").val("已读");
            } else if ('@Model.ReceiverIsRead'== 'False') {
                $("#ReceiverIsRead").val("未读");
            }
            if ('@Model.SenderIsDel'== 'True') {
                $("#SenderIsDel").val("已删除");
            } else if ('@Model.SenderIsDel'== 'False') {
                $("#SenderIsDel").val("未删除");
            }
             if ('@Model.ReaderIsDel'== 'True') {
                 $("#ReaderIsDel").val("已删除");
            } else if ('@Model.ReaderIsDel'== 'False') {
                 $("#ReaderIsDel").val("未删除");
            }

            //重新渲染页面
            form.render();
        }
        
    });
    </script>
}
